package com.techstar.ats.dxp.history;

import java.time.LocalDateTime;

import com.techstar.ats.dxp.CsvFormatter;
import com.techstar.ats.type.DirectionType;

public class F23HistoryRecord implements CsvFormatter {
	private static final long serialVersionUID = 1L;
	public int station;
	public int platform;
	public LocalDateTime arriveTime;
	public LocalDateTime departTime;
	public DirectionType dir;
	public String train;
	public String global;
	public String dest;
	public boolean plan;

	public boolean toCsvString(StringBuffer sb) {
		sb.append(this.station)
			.append(',')
			.append(this.platform)
			.append(',')
			.append(this.arriveTime.format(DATE_TIME_FORMATTER))
			.append(',')
			.append(this.departTime.format(DATE_TIME_FORMATTER))
			.append(',')
			.append(this.dir.value())
			.append(',')
			.append(this.train)
			.append(',')
			.append(this.global)
			.append(',')
			.append(this.dest)
			.append(',')
			.append(this.plan ? 1 : 0);
		return true;
	}
}
